package com.ws.haungjia.mapper;

import com.ws.haungjia.Bean.HoutaiUser;
import com.ws.haungjia.Bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

public interface DepmapprtMapper{
    @Insert("insert into user(Name,pass,shouji,touxiang,zhuceshijian) values(#{name},#{pass},#{shouji},#{touxiang},#{zhuceshijian})")
    public int insert(@Param("name") String name, @Param("pass") String pass, @Param("shouji") int shouji, @Param("touxiang") String touxiang, @Param("zhuceshijian") Date zhuceshijian);

    @Select("select * from user where name=#{name} and pass=#{pass}")
    public User denglu(@Param("name") String name,@Param("pass") String pass);

    //后台
    @Select("select * from houuser where Hname=#{name} and Hpass=#{miam}")
    public HoutaiUser Hdenglu(@Param("name") String name, @Param("miam") String miam);

    @Select("select Name from user where Name=#{name}")
    User chachong(String name);
}
